package com.ting.test.algorithms.图;

import java.util.List;

/**
 * 表示图中的一个边
 */
public class Edge {
    private  int weight;//表示入度，有多少个节点直接指向他
    private  Node from;//表示边的from节点
    private  Node to;//表示边的to节点

    public Edge(int weight, Node from, Node to) {
        this.weight = weight;
        this.from = from;
        this.to = to;
    }

    public int getWeight() {
        return weight;
    }

    public Node getFrom() {
        return from;
    }

    public Node getTo() {
        return to;
    }
}
